<template>
	<div class="top_box">
		<div class="top_item" v-for="(item, index) in message?.implementationList" :key="index">
			<div class="title_item">分包{{ index + 1 }}实施单位数据</div>
			<div class="longRever">
				<div class="item_box">
					<span class="item_name">数据来源</span>:
					<span class="item_value">{{ item.dataSource }}</span>
				</div>
				<div class="item_box">
					<span class="item_name">单位名称</span>:
					<span class="item_value">{{ item.unitName }}</span>
				</div>
				<div class="item_box">
					<span class="item_name">社会统一信用代码</span>:
					<span class="item_value">{{ item.code }}</span>
				</div>
				<div class="item_box">
					<span class="item_name">注册地址</span>:
					<span class="item_value">{{ item.registeredAddress }}</span>
				</div>
				<div class="item_box">
					<span class="item_name">单位联系人</span>:
					<span class="item_value">{{ item.contactPerson }}</span>
				</div>
				<div class="item_box">
					<span class="item_name">联系人电话</span>:
					<span class="item_value">{{ item.contactPhoneNumber }}</span>
				</div>
				<div class="item_box">
					<span class="item_name">企业类型</span>:
					<span class="item_value">{{ dictionary?.enterpriseType(item.enterpriseType) }}</span>
				</div>
				<div class="item_box">
					<span class="item_name">企业规模</span>:
					<span class="item_value">{{ dictionary?.enterpriseScale(item.enterpriseScale) }}</span>
				</div>
				<div class="item_box" v-if="item.localEnterprise == 1">
					<span class="item_name">纳税地区</span>:
					<span class="item_value">{{ item.taxRegion }}</span>
				</div>
				<div class="item_box">
					<span class="item_name">是否为本地企业</span>:
					<span class="item_value">{{ dictionary?.isYN(item.localEnterprise) }}</span>
				</div>
				<div class="item_box">
					<span class="item_name">采购项目号</span>:
					<span class="item_value">{{ item.projectNumber }}</span>
				</div>
				<div class="item_box">
					<span class="item_name">采购方式</span>:
					<span class="item_value">{{ dictionary?.procurementMethods(item.procurementMethod) }}</span>
				</div>
				<div class="item_box">
					<span class="item_name">中标金额(万元)</span>:
					<span class="item_value">{{ item.amount }}</span>
				</div>
			</div>
		</div>
		<div class="top_item">
			<div class="title_item">项目资料</div>
			<div class="longRever">
				<div class="item_box">
					<span class="item_name">资金预算批复文件</span>:
					<div v-if="message?.fundBudgetApproval">
						<HyUploadFile :type="'view'" v-model="message.fundBudgetApproval" />
					</div>
				</div>
				<div class="item_box">
					<span class="item_name">应用管理制度</span>:
					<div v-if="message?.applicationManagementSystem">
						<HyUploadFile :type="'view'" v-model="message.applicationManagementSystem" />
					</div>
				</div>
				<div class="item_box">
					<span class="item_name">其他补充材料</span>:
					<div v-if="message?.otherSupplementaryMaterials">
						<HyUploadFile :type="'view'" v-model="message.otherSupplementaryMaterials" />
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script lang="ts" setup>
import HyUploadFile from '/@/components/HyUpload/index.vue';
import dictionary from './dictionary.js';
import { toRefs, defineProps, ref, useAttrs } from 'vue';
const props = defineProps({
	message: {
		type: Object,
		defalut: () => {},
	},
});

const { message } = toRefs(props);
</script>

<style lang="scss" scoped>
.top_box {
	.top_item {
		.title_item {
			font-size: 15px;
			font-weight: 600;
			margin-bottom: 5px;
		}
		.longRever {
			width: 100%;
			display: flex;
			flex-wrap: wrap;

			.item_box {
				width: 30%;
				margin: 5px 0px;
				display: flex;
				// flex-wrap: wrap;

				.item_name {
					color: #999999;
					// width: 58px;
				}
				.item_value {
					flex: 1;
				}
			}

			.item_box_w {
				width: 100%;
				margin: 5px 0px;
				display: flex;
				// flex-wrap: wrap;

				.item_name {
					color: #999999;
					// width: 58px;
				}

				.table {
					flex: 1;
				}
			}
		}
	}
}

.data_ying {
	:deep(.el-card) {
		border: 0px;
	}

	:deep(.el-card:hover) {
		box-shadow: 0 0 0px 0px;
	}
	:deep(.el-card__header) {
		background-color: #ffffff;
	}
}
</style>
